package custom.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.web.servlet.ModelAndView;

import com.google.gson.Gson;
import common.Constant;

public class BaseController {
	protected ModelAndView json(Object ob, HttpServletRequest request){
		Gson gson = new Gson();
		ModelAndView mav = new ModelAndView("./../../jsp/json");
		mav.addObject(Constant.JSON_ATRIBUTE_NAME, gson.toJson(ob));
		return mav;
	}
}
